package org.edu.modules.liancategory.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import org.edu.modules.liancategory.entity.VeCuzCourseCategory;
import org.edu.modules.liancategory.mapper.VeCuzCourseCategoryMapper;
import org.edu.modules.liancategory.service.IVeCuzCourseCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class VeCuzCourseCategoryServiceImpl
        extends ServiceImpl<VeCuzCourseCategoryMapper, VeCuzCourseCategory>
        implements IVeCuzCourseCategoryService
{
    @Autowired
    VeCuzCourseCategoryMapper veCuzCourseCategoryMapper;

    public boolean saveCate(VeCuzCourseCategory veCuzCourseCategory)
    {
        return SqlHelper.retBool(Integer.valueOf(((VeCuzCourseCategoryMapper)getBaseMapper()).insert(veCuzCourseCategory)));
    }

    public VeCuzCourseCategory getByCourse(int courseid, int cateid)
    {
        return this.veCuzCourseCategoryMapper.getByCourse(courseid, cateid);
    }
}
